package domVSsax;

import java.util.List;
import java.util.Map;

public class XmlParserSample {

	public static void main(String[] args) {
		long start = System.currentTimeMillis();
		
		List<Map<String,String>> domList = DomServer.readXML("sample.xml", "student");
		System.out.println(domList.size());
		System.out.println("Parser the xml by Dom in " + (System.currentTimeMillis() - start) + "ms");
		
		start = System.currentTimeMillis();
		List<Map<String,String>> saxList = SaxServer.readXML("sample.xml", "root");
		System.out.println(saxList.size());
		System.out.println("Parser the xml by Sax in " + (System.currentTimeMillis() - start) + "ms");

	}

}
